<div class="dashboard">
	<div class="page-module">
		<div class="navbar-header block">
			<span class="navbar-brand" href="#">Sucursales</span>
		</div>
		<div class="block">
			<ui class="nav nav-pills nav-stacked">
			<li ng-class="$parent.currentStore.id==store.id?'active':''"
				ng-repeat="store in stores"><a href=""
				ng-click="$parent.showStore(store.id)">@{{store.fastName}} <i
					class="glyphicon glyphicon-chevron-right pull-right"></i>
			</a></li>

			</ui>
		</div>
		<div class="block">

			<button data-toggle="modal" ng-click="showFastNameModal()"
				class="btn btn-block">
				Nueva tienda<i class="glyphicon glyphicon-plus pull-right"></i>
			</button>

		</div>
	</div>
</div>
<div class="content-main">
	<div class="page-module">

		<form ng-submit="updateStore()">
			<div class="row">
				<div class="col-md-6">
					<label for="fastName">Nombre clave</label><span ng-bind="currentStore.fastName"
						class="form-control" id="fastName"></span>
				</div>
				<div class="col-md-6">
					<label for="completeName">Nombre completo</label><input type="text"
						class="form-control" ng-model="currentStore.completeName"
						id="completeName">
				</div>
			</div>


		</form>
		<div id="map" style="height: 500px"></div>
	</div>
</div>
<div class="modal fade" id="fastNameModal">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" ng-click="hideFastNameModal()"
					aria-hidden="true">&times;</button>
				<h4 class="modal-title">Nueva tienda</h4>
			</div>
			<form ng-submit="createStore()">
				<div class="modal-body">
					<label for="fast-name">Nombre clave</label> <input id="fast-name"
						type="text" pattern="^[a-zA-Z]\w{4,15}$"
						ng-pattern="/^[a-zA-Z]\w{4,15}$/" ng-model="newStore.fastName"
						class="form-control"> <span class="alert-danger">{{newStore.errorMessage}}</span>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
					<button type="submit" class="btn btn-primary">Crear</button>
				</div>
			</form>
		</div>
		<!-- /.modal-content -->
	</div>
	<!-- /.modal-dialog -->
</div>
<!-- /.modal -->